const state = {
  show: false,
  updateOrder: false,
  isDelete: false,
  deleteIndex: 0,
  subType: 0
}
const mutations = {
  SET_SHOW: (state, show) => {
    state.show = show
  },
  SET_UPDATE_ORDER (state, status) {
    state.updateOrder = status
  },
  SET_IS_DELETE (state, status) {
    state.isDelete = status
  },
  SET_INDEX (state, index) {
    state.deleteIndex = index
  },
  SET_SUB_TYPE (state, index) {
    state.subType = index
  }
}
const actions = {
  changeShow ({ commit }, show) {
    commit('SET_SHOW', show)
  },
  updataOrder ({ commit }, status) {
    commit('SET_UPDATE_ORDER', status)
  },
  setIsDelete ({ commit }, status) {
    commit('SET_IS_DELETE', status)
  },
  setIndex ({ commit }, index) {
    commit('SET_INDEX', index)
  },
  setType ({ commit }, index) {
    commit('SET_SUB_TYPE', index)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
